namespace go admin
include "admin_product.thrift"
include "error_code.thrift"
include "admin_orders.thrift"
include "admin_product_category.thrift"
include "admin_user.thrift"
include "admin_user_address.thrift"
include "admin_orders_log.thrift"
include "common.thrift"
include "admin_menu.thrift"
include "admin_administrator.thrift"
include "admin_express.thrift"
include "admin_product_specifications.thrift"
include "admin_product_material_group.thrift"
include "admin_product_material.thrift"
include "admin_login.thrift"
struct BaseResponse{
	1:  error_code.ErrorCode Code     (api.body = "code")
	2:  string               Message  (api.body = "message")
}

service Login {
    admin_login.LoginResponse Login(1: admin_login.LoginRequest request) (api.post="/admin-api/login" api.handler_path='login');
    admin_login.LogoutResponse Logout(1: admin_login.LogoutRequest request) (api.post="/admin-api/logout" api.handler_path='login');
}
service AdminMenuService {
    admin_menu.MenuBuildResponse MenuBuild(1: admin_menu.MenuBuildRequest request) (api.get="/admin/menu/build" api.handler_path='menu');
    admin_menu.GetMenuListResponse GetMenuList(1: admin_menu.GetMenuListRequest request) (api.get="/admin/get-menu-list");
    admin_menu.DeleteMenuResponse DeleteMenu(1: admin_menu.DeleteMenuRequest request) (api.post="/admin/delete-menu");
    admin_menu.CreateMenuResponse CreateMenu(1: admin_menu.CreateMenuRequest request) (api.post="/admin/create-menu");
}
struct GetAdminListRequest{
	1:  i64 Page = 1  (api.query = "page")
	2:  i64 Size = 20 (api.query = "size")
}

struct GetAdminListResponse{
	1:  error_code.ErrorCode                    Code  (api.body = 'code')
	2:  list<admin_administrator.Administrator> Data  (api.body = 'data')
	3:  i64                                     Page  (api.body = 'page')
	4:  i64                                     Size  (api.body = 'size')
}

struct BIZ{
	1:  i64    ID    (api.body = "id")
	2:  string Name  (api.body = "name")
	3:  string Key   (api.body = "key")
}

struct GetBIZListRequest{
	1:  i64 Page = 1  (api.query = "page")
	2:  i64 Size = 20 (api.query = "size")
}

struct GetBIZListResponse{
	1:  error_code.ErrorCode Code  (api.body = 'code')
	2:  list<BIZ>            Data  (api.body = 'data')
	3:  i64                  Page  (api.body = 'page')
	4:  i64                  Size  (api.body = 'size')
}

struct GetRoleListRequest{
	1:  i64 Page = 1  (api.query = "page")
	2:  i64 Size = 20 (api.query = "size")
}

struct Role{
	1:  i64          ID        (api.body = "id")
	2:  string       Nickname  (api.body = 'nickname')
	3:  list<string> roles     (api.body = 'roles')
}

struct GetRoleListResponse{
	1:  error_code.ErrorCode Code  (api.body = 'code')
	2:  list<Role>           Data  (api.body = 'data')
	3:  i64                  Page  (api.body = 'page')
	4:  i64                  Size  (api.body = 'size')
}

struct Menu{
	1:  i64    ID    (api.body = "id")
	2:  string Name  (api.body = 'name')
	3:  i64    PID   (api.body = 'pid')
}

struct CreateBIZRequest{
	2:  string Name  (api.body = 'name')
	3:  string Key   (api.body = 'key')
}

struct CreateBIZResponse{
	1:  error_code.ErrorCode Code  (api.body = 'code')
	2:  BIZ                  Data  (api.body = 'data')
}

struct UpdateMenuRequest{
	1:  i64    ID    (api.body = "id")
	2:  string Name  (api.body = 'name')
	3:  i64    PID   (api.body = 'pid')
}

struct UpdateMenuResponse{
	1:  error_code.ErrorCode Code  (api.body = 'code')
	2:  Menu                 Data  (api.body = 'data')
}

struct GetFirstMenuListRequest{

}

struct GetFirstMenuListResponse{
	1:  error_code.ErrorCode Code  (api.body = 'code')
	2:  list<Menu>           Data  (api.body = 'data')
}

service SettingService {
    GetAdminListResponse GetAdminList(1: GetAdminListRequest request) (api.get="/api/get-admin-list");
    admin_administrator.GetAdministratorInfoResponse GetAdministratorInfo(1: admin_administrator.GetAdministratorInfoRequest request) (api.get="/admin/get-administrator-info");
    GetFirstMenuListResponse GetFirstMenuList(1: GetFirstMenuListRequest request) (api.get="/api/get-first-menu-list");
    UpdateMenuResponse UpdateMenu(1: UpdateMenuRequest request) (api.post="/api/update-menu");
    // biz
    CreateBIZResponse CreateBIZ(1: CreateBIZRequest request) (api.post="/api/create-biz");
    GetBIZListResponse GetBIZList(1: GetBIZListRequest request) (api.get="/api/get-biz-list");
}
service ProductService {
    admin_product.GetProductListResponse GetProductList(1: admin_product.GetProductListRequest request) (api.get="/admin/get-product-list");
    admin_product.CreateProductResponse CreateProduct(1: admin_product.CreateProductRequest request) (api.post="/admin/create-product");
    admin_product.DeleteProductResponse DeleteProduct(1: admin_product.DeleteProductRequest request) (api.post="/admin/delete-product");
    admin_product.UpdateProductResponse UpdateProduct(1: admin_product.UpdateProductRequest request) (api.post="/admin/update-product");
    admin_product.GetProductInfoResponse GetProductInfo(1: admin_product.GetProductInfoRequest request) (api.get="/admin/get-product-info");
}
service ProductCategoryService{
    admin_product_category.CreateCategoryResponse CreateCategory(1: admin_product_category.CreateCategoryRequest request) (api.post="/admin/create-category");
    admin_product_category.GetCategoryListResponse GetCategoryList(1: admin_product_category.GetCategoryListRequest request) (api.get="/admin/get-category-list");
    admin_product_category.DeleteCategoryResponse DeleteCategory(1: admin_product_category.DeleteCategoryRequest request) (api.post="/admin/delete-category");
    admin_product_category.UpdateCategoryResponse UpdateCategory(1: admin_product_category.UpdateCategoryRequest request) (api.post="/admin/update-category");
    admin_product_category.GetCategoryInfoResponse GetCategoryInfo(1: admin_product_category.GetCategoryInfoRequest request) (api.get="/api/get-category-info");
    admin_product_category.GetSelectCategoryListResponse GetSelectCategoryList(1: admin_product_category.GetSelectCategoryListRequest request) (api.get="/admin/get-select-category-list");
}
service ProductSpecficationsService{
    admin_product_specifications.CreateSpecificationsResponse CreateSpecifications(1: admin_product_specifications.CreateSpecificationsRequest request) (api.post="/admin/create-product-specifications");
    admin_product_specifications.GetSpecificationsListResponse GetSpecificationsList(1: admin_product_specifications.GetSpecificationsListRequest request) (api.get="/admin/get-product-specifications-list");
    admin_product_specifications.DeleteSpecificationsResponse DeleteSpecifications(1: admin_product_specifications.DeleteSpecificationsRequest request) (api.post="/admin/delete-product-specifications");
    admin_product_specifications.UpdateSpecificationsResponse UpdateSpecifications(1: admin_product_specifications.UpdateSpecificationsRequest request) (api.post="/admin/update-product-specifications");
    admin_product_specifications.FormatSpecificationsResponse FormatSpecifications(1: admin_product_specifications.FormatSpecificationsRequest request) (api.post="/admin/format-product-specifications");
}
service ProductMaterialGroupService{
    admin_product_material_group.CreateMaterialGroupResponse CreateMaterialGroup(1: admin_product_material_group.CreateMaterialGroupRequest request) (api.post="/admin/create-product-material-group");
    admin_product_material_group.GetMaterialGroupListResponse GetMaterialGroupList(1: admin_product_material_group.GetMaterialGroupListRequest request) (api.get="/admin/get-product-material-group-list");
    admin_product_material_group.UpdateMaterialGroupResponse UpdateMaterialGroup(1: admin_product_material_group.UpdateMaterialGroupRequest request) (api.post="/admin/update-product-material-group");
    admin_product_material_group.DeleteMaterialGroupResponse DeleteMaterialGroup(1: admin_product_material_group.DeleteMaterialGroupRequest request) (api.post="/admin/delete-product-material-group");
}
service ProductMaterialService{
    admin_product_material.GetMaterialListResponse GetMaterialList(1: admin_product_material.GetMaterialListRequest request) (api.get="/admin/get-product-material-list");
    admin_product_material.DeleteMaterialResponse DeleteMaterial(1: admin_product_material.DeleteMaterialRequest request) (api.post="/admin/delete-product-material");
    admin_product_material.UploadMaterialResponse UploadMaterial(1: admin_product_material.UploadMaterialRequest request) (api.post="/admin/upload-product-material");
    admin_product_material.CreateMaterialResponse CreateMaterial(1: admin_product_material.CreateMaterialRequest request) (api.post="/admin/create-product-material");
}
service OrdersService {
    admin_orders.GetOrderListResponse GetOrderList(1: admin_orders.GetOrderListRequest request) (api.get="/admin/get-order-list");
    admin_orders.UpdateOrderResponse UpdateOrder(1: admin_orders.UpdateOrderRequest request) (api.post="/api/update-order");
    admin_orders.DeliveryOrderResponse DeliveryOrder(1: admin_orders.DeliveryOrderRequest request) (api.post="/admin/delivery-order");
    admin_orders.RemarkOrderResponse RemarkOrder(1: admin_orders.RemarkOrderRequest request) (api.post="/admin/remark-order");
    admin_orders.GetOrderInfoResponse GetOrderInfo(1: admin_orders.GetOrderInfoRequest request) (api.get="/api/get-order-info");
    admin_orders.GetOrderDetailResponse GetOrderDetail(1: admin_orders.GetOrderDetailRequest request) (api.get="/admin/get-order-detail");
}
service OrderLogService {
    admin_orders_log.GetOrderLogListResponse GetOrderLogList(1: admin_orders_log.GetOrderLogListRequest request) (api.get="/admin/get-order-log-list");
}
service UserAddressService {
    admin_user_address.GetUserAddressInfoResponse GetUserAddressInfo(1: admin_user_address.GetUserAddressInfoRequest request) (api.get="/admin/get-user-address-info");
}
service ExpressService {
    admin_express.GetExpressListResponse GetExpressList(1: admin_express.GetExpressListRequest request) (api.get="/admin/get-express-list");
    admin_express.GetExpressSelectListResponse GetExpressSelectList(1: admin_express.GetExpressSelectListRequest request) (api.get="/admin/get-express-select-list");
    admin_express.GetExpressInfoResponse GetExpressInfo(1: admin_express.GetExpressInfoRequest request) (api.get="/admin/get-express-info");
    admin_express.DeleteExpressResponse DeleteExpress(1: admin_express.DeleteExpressRequest request) (api.post="/admin/delete-express");
    admin_express.UpdateExpressResponse UpdateExpress(1: admin_express.UpdateExpressRequest request) (api.post="/admin/update-express");
    admin_express.CreateExpressResponse CreateExpress(1: admin_express.CreateExpressRequest request) (api.post="/admin/create-express");
}
service User{
    admin_user.GetUserListResponse GetUserList(1: admin_user.GetUserListRequest request) (api.get="/admin/get-user-list");
    admin_user.GetUserInfoResponse GetUserInfo(1: admin_user.GetUserInfoRequest request) (api.get="/admin/get-user-info");
    admin_user.AddUserPointsResponse AddUserPoints(1: admin_user.AddUserPointsRequest request) (api.post="/admin/add-user-points");
}